
<?php 
$search = array();
foreach ($this->search as $key => $value) {
	$search["search[$key]"] = $value;
}

foreach ($this->m2msearch as $key => $value) {
	$search["m2msearch[$key]"] = $value;
}

$urlOptions = array_merge($search, array(
	'orderDesc' => $this->orderDesc,
	'orderBy' => $this->orderBy,
));

$params = '?';
foreach ($urlOptions as $key => $value) {
	if (!$value) continue;
	$params .= "$key=$value&";
}

if ($this->pageCount): 
?>
<div class="paginationControl">
<!-- Previous page link -->
<p><b>
		Записи с <?php echo $this->firstItemNumber; ?> 
		по <?php echo $this->lastItemNumber; ?>. 
		Всего записей: <?php echo $this->totalItemCount; ?>
</b></p>
<?php // if ($this->pageCount == 1) return; ?>
<?php if (isset($this->previous)): ?>
  <b><a href="<?php echo $this->url(array('action' => 'list', 'page' => $this->previous)) . $params; ?>">
    &lt; Назад
  </a></b> |
<?php else: ?>
  <span class="disabled">&lt; Назад</span> |
<?php endif; ?>
 
<!-- Numbered page links -->
<?php foreach ($this->pagesInRange as $page): ?>
  <?php if ($page != $this->current): ?>
    <a href="<?php echo $this->url(array('action' => 'list', 'page' => $page)) . $params; ?>">
        <?php echo $page; ?>
    </a> |
  <?php else: ?>
    <b><?php echo $page; ?></b> |
  <?php endif; ?>
<?php endforeach; ?>
 
<!-- Next page link -->
<?php if (isset($this->next)): ?>
  <b><a href="<?php echo $this->url(array('action' => 'list', 'page' => $this->next)) . $params; ?>">
    Вперед &gt;
  </a></b>
<?php else: ?>
  <span class="disabled">Вперед &gt;</span>
<?php endif; ?>
</div>
<?php endif; ?>








